/*
 * @Author: weikang
 * @Description:
 * @Date: 2023-12-22 10:28:43
 * @LastEditTime: 2024-06-15 13:50:10
 * @FilePath: \env-manager-pc\src\router\modules\data.query.ts
 */
import type { RouteRecordRaw } from 'vue-router'

function Layout() {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/data-query',
  component: Layout,
  redirect: '/data-query/pollute-err',
  name: 'data-query',
  meta: {
    title: '数据查询',
    icon: 'ep:postcard',
  },
  children: [
    {
      path: 'declare',
      name: 'data-declare',
      meta: {
        title: '检修申报',
        auth: '/data-query/pollute-err',
      },
      children: [{
        path: '',
        name: 'data-declare-list',
        component: () => import('@/views/data_query/declare/index.vue'),
        meta: {
          title: '检修申报',
          sidebar: false,
          breadcrumb: false,
          auth: '/data-query/pollute-err',
        },
      }],
    },
    {
      path: 'pollute-err',
      name: 'data-pollute-err',
      meta: {
        title: '污处异常查询',
        auth: '/data-query/pollute-err',
      },
      children: [{
        path: '',
        name: 'data-pollute-err-list',
        component: () => import('@/views/data_query/pollute_err/index.vue'),
        meta: {
          title: '污处异常查询',
          sidebar: false,
          breadcrumb: false,
          auth: '/data-query/pollute-err',
        },
      },
      {
        path: 'electric/:id',
        name: 'data-pollute-err-detail',
        component: () => import('@/views/data_query/pollute_err/err.detail.vue'),
        meta: {
          title: '用电数据情况',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/pollute-err',
          auth: '/data-query/pollute-err/electric/:id',
        },
      }],
    },
    {
      path: 'real-time',
      name: 'data-real-time',
      meta: {
        title: '实时数据查询',
        auth: '/data-query/real-time',
      },
      children: [{
        path: '',
        name: 'data-real-time-list',
        component: () => import('@/views/data_query/realtime/index.vue'),
        meta: {
          title: '实时数据查询',
          sidebar: false,
          breadcrumb: false,
          auth: '/data-query/real-time',
        },
      },
      {
        path: 'electric/:id',
        name: 'data-real-time-detail',
        component: () => import('@/views/data_query/realtime/real.info.vue'),
        meta: {
          title: '实时数据详情',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/real-time',
          auth: '/data-query/real-time/electric/:id',
        },
      }],
    },
    {
      path: 'powers',
      name: 'data-powers',
      meta: {
        title: '电量数据查询',
        auth: '/data-query/powers',
      },
      children: [{
        path: '',
        name: 'data-powers-list',
        component: () => import('@/views/data_query/powers/index.vue'),
        meta: {
          title: '电量数据查询',
          sidebar: false,
          breadcrumb: false,
          auth: '/data-query/powers',
        },
      },
      {
        path: 'electric/:id',
        name: 'data-powers-detail',
        component: () => import('@/views/data_query/powers/powers.detail.vue'),
        meta: {
          title: '电量数据详情',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/powers',
          auth: '/data-query/powers/electric/:id',
        },
      }],
    },
    {
      path: 'ent-day-power',
      name: 'data-ent-day-power',
      meta: {
        title: '企业日电量查询',
        auth: '/data-query/ent-day-power',
      },
      children: [{
        path: '',
        name: 'data-ent-day-power-list',
        component: () => import('@/views/data_query/ent_day_power/index.vue'),
        meta: {
          title: '企业日电量查询',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/ent-day-power',
        },
      },
      {
        path: ':id',
        name: 'data-ent-day-power-detail',
        component: () => import('@/views/data_query/ent_day_power/ent.day.detail.vue'),
        meta: {
          title: '企业日电量详情',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/ent-day-power',
          auth: '/data-query/ent-day-power/:id',
        },
      }],
    },
    {
      path: 'power',
      name: 'data-power',
      meta: {
        title: '功率数据查询',
        auth: '/data-query/power',
      },
      children: [
        {
          path: '',
          name: 'data-power-list',
          component: () => import('@/views/data_query/power/index.vue'),
          meta: {
            title: '功率数据查询',
            sidebar: false,
            breadcrumb: false,
            activeMenu: '/data-query/power',
            auth: '/data-query/power',
          },
        },
        {
          path: 'electric/:id',
          component: () => import('@/views/data_query/power/power.detail.vue'),
          meta: {
            title: '电量数据详情',
            name: 'data-power-detail',
            sidebar: false,
            breadcrumb: false,
            activeMenu: '/data-query/power',
            auth: '/data-query/power/electric/:id',
          },
        },
      ],
    },
    {
      path: 'power-off',
      name: 'data-power-off',
      meta: {
        title: '停上电事件查询',
        auth: '/data-query/power-off',
      },
      children: [{
        path: '',
        name: 'data-power-off-list',
        component: () => import('@/views/data_query/power_off/index.vue'),
        meta: {
          title: '停上电事件查询',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/power-off',
        },
      },
      {
        path: 'detail/:id',
        name: 'data-power-off-detail',
        component: () => import('@/views/data_query/power_off/power.off.detail.vue'),
        meta: {
          title: '停上电事件详情',
          sidebar: false,
          breadcrumb: false,
          activeMenu: '/data-query/power-off',
          auth: '/data-query/power-off/detail/:id',
        },
      }],
    },
  ],
}

export default routes
